<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js使用</title>
</head>

<body>
    <div id="t"><input type="hidden" id="sss" value="aaa"></div>
</body>
<script>
    var d = document.getElementById("sss").getAttribute("value");
    document.write(d);//在页面打印通过div获取到的value值
</script>

</html>